<script setup lang="ts">
import { ref } from 'vue';

const arr= ref(['苹果','香蕉','菠萝'])
const person = ref({name:'jack',age:18,gender:'男'})
</script>

<template>
  <div class="app-page">app
<ul>
    //遍历数组
    <li v-for="(item,index) in arr " :key='index'>
     {{item}}
    </li>
    
</ul>
<ul>
    //遍历对象
    <li v-for="(value,key,index) in person " :key="index">
    键:{{ key }},值：{{ value }},索引：{{ index }}
    </li>
</ul>
  </div>
  //遍历数字
  <div v-for="(item) in 10" :key="item">{{ item }}</div>
</template>

<style lang="css" scoped></style>
